#include "widget.h"
#include "ui_widget.h"
#include<QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QRect rect=ui->pushButton->geometry();
    qDebug()<<rect;
    ui->pushButton->setGeometry(rect.x()-rect.x(),rect.y()-rect.y(),rect.width(),rect.height());
}

void Widget::on_pushButton_2_clicked()
{
    QRect rect=ui->pushButton_2->frameGeometry();
    QSize size=ui->pushButton_2->frameSize();
    qDebug()<<rect;
}
